package com.hadoop.test;

/**
 * <p></p>
 *
 * @author Andy
 * @date 2017/11/8
 */
public class BitCount {
    private static final int VAL = 32;

    public static void main(String[] args) {
        int a = -6;
        int count = 1;
        for(int i = 0 ; i < VAL ;i ++) {
            int b = (a & 0x80000000 >>> i) >>> (31 - i);
            System.out.print(b);
            if ( count % 4 == 0) {
                System.out.print("|");
            }
            count++;
        }
    }
}
